package com.zbkj.service.model.vo;

import com.zbkj.dal.entity.product.ProductBrand;
import com.zbkj.dal.pojo.vo.BrandListVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel
public class BrandGroupVO {

    @ApiModelProperty(value = "组名", example = "a")
    private String groupKey;

    @ApiModelProperty(value = "订单列表")
    private List<BrandListVO> brandListVOList;

    public static BrandGroupVO generate(String groupKey, List<ProductBrand> brands) {
        BrandGroupVO brandGroupVO = new BrandGroupVO();
        brandGroupVO.setGroupKey(groupKey);
        brandGroupVO.setBrandListVOList(BrandListVO.generate(brands));
        return brandGroupVO;
    }
}
